home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
dbase
/
db3ut10u.zip
/
EGREP3.DOC
< prev
next >
Wrap
Text File
|
1991-10-12
|
3KB
|
96 lines
NAME
egrep3 - egrep into dBase III files v1.0a, may 1991.
SYNOPSIS
egrep3 [-ivclh] [-F c] regex file [files...]
DESCRIPTION
`egrep3' searches into `files' (in dBase III format) for records
containing the `regex' pattern and prints them on stdout. `regex' is
an extended regular expression (see below).
Output is in the form:
file(n)= field1:field2: ... :fieldN
where `n' specifies the record number where match occurred.
If "-F c" option is specified then "c" is taken as the output field
separator (OFS) instead of ":".
REGULAR EXPRESSIONS
c a single (non-meta) character matches itself.
. matches any single character except newline.
? postfix operator; preceeding item is optional.
* postfix operator; preceeding item 0 or more times.
+ postfix operator; preceeding item 1 or more times.
| infix operator; matches either argument.
^ matches the empty string at the beginning of a field.
$ matches the empty string at the end of a field.
\< matches the empty string at the beginning of a word.
\> matches the empty string at the end of a word.
[chars] match any character in the given class; if the first
character after [ is ^, match any character not in the
given class; a range of characters may be specified by
first-last; for example, [A-F0-2] is equivalent to the
class [ABCDEF012].
( ) parentheses are used to override operator precedence.
\digit \n matches a repeat of the text matched earlier in the
regexp by the subexpression inside the nth opening
parenthesis.
\ any special character may be preceded by a backslash to
match it literally.
Operator precedence is (highest to lowest) ?, *, and +,
concatenation, and finally |. All other constructs are
syntactically identical to normal characters.
COMMAND LINE OPTIONS
-i ignore case
-v print only lines that do not match `regex'
-c print only a count of lines matched for each file
-l print only names of files that have matches
-F c use character "c" as output field separator
-h help
EXIT STATUS
0 at least a match has been found in any of the files
specified
1 usage error
2 no match has been found
3 no match found and errors opening one or more files
4 unknown command line option
EXAMPLES
search for "word1" or "word2":
egrep3 "\<word1\>|\<word2\>" words.dbf
search for C style identifiers:
egrep3 "[a-zA-Z][a-zA-Z0-9]*" variabls.dbf
search for "[male]" or "[female]" alone in a field (ignore case):
egrep3 -i "^\[(male|female)\]$" persons.dbf
SEE ALSO
count3, fgrep3, pack3, stru3, zap3.
AUTHORS
Legovich Danilo.
COPYRIGHT
This program is a part of a shareware product. You may register
using the order form (file "ORDER.TXT") provided with the package.
For any suggestion or problem contact the author at this e-mail
address:
dany@alessia.dei.unipd.it